<!DOCTYPE html>
<html>
<head>
    <title>${sysEn}-文件</title>
     <#include "/common/com_edit_css.ftl" >
</head>
<body>
    <div class="wrapper wrapper-content fadeInRight commoneditpage">
        <div class="row">
            <div class="col-lg-8 m-auto">
                <div class="ibox ">
                    <div class="ibox-title">
                        <h5>${actNm}-文件</h5>
                    </div>
                    <div class="ibox-content">
                        <form id="form" action="${ctx}/cms_media_upload" method="post">

                            <div class="form-group row"><label class="col-lg-2 col-form-label must">类别：</label>
                                <div class="col-lg-10">
                                	 <select class="form-control m-b" name="typeId" id="typeId">
                                			<#list typeList as p>
			 									 <#if p.id == obj.typeId >
												    <option value="${p.id}" selected="selected">${p.name}</option>
												  <#else>
												   <option value=${p.id}>${p.name}</option>	
												  </#if>					
											</#list>
			                            </select>
                                </div>
                            </div>

                              <div class="form-group row"><label class="col-lg-2 col-form-label must">备注：</label>
                                <div class="col-lg-10">
                                    <input type="text" placeholder=""
                                           value=""
                                           id="remarks" name="remarks" class="form-control"
                                           data-easyform="null"
                                           data-message-null="请输入备注" />
                                </div>
                            </div>
                            <input name="file" type="file" id="file" value="选择" />
                           
                            <div class="form-group row ">
                                <div class="col-lg-offset-2 col-lg-10">
                                    <button class="btn btn-sm btn-primary" type="button" id="signBtn" tg="ensure">确定</button>
                                    <button class="btn btn-sm btn-white" type="button" id="cancelBtn" tg="cancel">取消</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <#include "/common/com_edit_js.ftl">
    <script type="text/javascript" charset="utf-8" src="/js/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/js/ueditor/ueditor.all.min.js"> </script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8" src="/js/ueditor/lang/zh-cn/zh-cn.js"></script>
    <script type="text/javascript">
    	var ue = UE.getEditor('uecontainer');
        $('.i-checks').iCheck({
            checkboxClass: 'icheckbox_square-green',
            radioClass: 'iradio_square-green',
        });
        $(document).ready(function () {

            EditPager.init({
                container:$("#form"),
                fileForm:true,
                param:function () {
                    var formData = new FormData();
            		formData.append("file", document.getElementById("file").files[0]);
            		formData.append("typeId", $("#typeId option:selected").val());   
            		formData.append("remarks", $("#remarks").val());   
                    return formData;
                }
            });
        });
      

    </script>
</body>
</html>
